<template>
  <div class="project">
    <el-table :data="projectList" height="424">
      <el-table-column label="项目编号" align="center" prop="projectNum" />
      <el-table-column label="项目名称" align="center" prop="projectName" />
      <el-table-column label="关联企业" align="center" prop="enterpriseName" />
      <el-table-column label="关联单位" align="center" prop="unitName" />
      <el-table-column label="类型" align="center" prop="projectStatus" >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.project_step" :value="scope.row.projectStatus"/>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" @click="detail(scope.row.id)">详情</el-button>
        </template>
      </el-table-column>
    </el-table>
    <!-- <div class="flex jc-center">
      <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
        @pagination="getList" />
    </div> -->

  </div>
</template>

<script>
  // import { myProject } from '@/api/jiubu/home'
  export default{
    dicts:['project_step'],
    data(){
      return {
        queryParams:{
          pageNum:1,
          pageSize:5
        },
        total:100,
        projectList:[]
      }
    },
    created() {
      this.getList()
    },
    methods:{
      async getList(){
        let res = await myProject({
          ...this.queryParams
        })
        this.projectList = res.rows
        this.total = res.total
      },
      detail(id){
        this.$router.push('/ProjectDetail?id='+id)
      },
    }
  }
</script>

<style scoped lang="scss">
  .project{
    margin-top: 20px;
  }
</style>
